//
//  BaseTableVC.h
//  ocCrazy
//
//  Created by mac on 2018/7/3.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "BaseViewController.h"



@class BaseModel;
@protocol BaseTableVCInterface <NSObject>




@optional



- (NSInteger)sectionCount;

- (NSArray <NSArray <NSString *> *> *)classArr;

- (NSArray <NSArray <NSString *> *> *)classArrWithType:(NSString *)type;

- (NSInteger)rowsCount:(NSInteger)section;

- (CGFloat)sectionHeaderHeight:(NSInteger)section;

- (CGFloat)sectionFooterHeight:(NSInteger)section;

- (void)tableViewSelectAtIndexPath:(NSIndexPath *)indexPath;

- (__kindof BaseModel *)modelForCell:(NSIndexPath *)indexPath;
//1   header  2  footer
- (__kindof BaseModel *)modelForHeaderFooter:(NSInteger)section withType:(NSString *)type;



- (NSArray *)viewClassForSectionFooterHeader;
- (NSArray *)noViewHeaderSection;
- (NSArray *)noViewFooterSection;






@end

@interface BaseTableVC : BaseViewController

@property (nonatomic,weak) UITableView * tableView;

@property (nonatomic,weak) id <BaseTableVCInterface> tableViewInterface;

@property (nonatomic,strong) NSMutableArray * dataSouece;

@property (nonatomic,assign) NSInteger page;

@property (nonatomic,assign) BOOL same;


- (void)needRefresh;

- (void)setType:(NSString *)type withReload:(BOOL)reload;

- (void)needIndex:(NSArray *)keyArr;




- (void)detailModelwithArr:(NSArray <__kindof BaseModel *> *)arr withCallBack:(void(^)(void))callBack;
@end
